Skip to main content

Delete Product

POST /api/v1/Products/:id

Description

This endpoint allows deleting a product.

Headers:

  • No specific headers are required.

Path Parameters:

  • version: The version of the API.

  • id: The unique identifier of the product.

URL:

  • DELETE: /api/v1/Products/{id}

Response:

  • 200: Success, returns a string response indicating the success of the deletion operation.

Error Codes:

  • 400: Bad request, the request is not valid.

  • 404: Not found, the product does not exist or is invalid.

  • 500: Internal server error, something went wrong while processing the request.

Example Response:

HTTP/1.1 200 OK
"Product with ID: 123 has been deleted successfully."

Method: DELETE

/api/v1/Products/:id

Headers

Content-TypeValue
Accepttext/plain

Response: 200

{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": "<string>"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /api/v1/Products/:id \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!